/* eslint-disable */
import { Button, Divider } from 'antd'

import { downloadByBase64, downloadByOnlineUrl } from '/@/utils/file'

export default function Index() {
    const downImg = () => {
        downloadByOnlineUrl(
            'https://img1.baidu.com/it/u=3007048469,3759326707&fm=253&fmt=auto&app=120&f=JPEG?w=889&h=500',
            '图片.jpg'
        )
    }
    const downFile = () => {
        downloadByBase64(
            '',
            '图片.jpg'
        )
    }
    return (
        <div className="card">
            <Button onClick={downFile}>下载文件</Button>
            <Divider />
            <Button onClick={downImg}>下载在线图片</Button>
        </div>
    )
}
